package com.bluefish.bltuan.action;

import java.util.List;

import org.apache.struts2.rest.HttpHeaders;

import com.bluefish.bltuan.module.Category;
import com.bluefish.bltuan.module.msg.Message;
import com.bluefish.bltuan.service.MsgService;

/**
 * 用于外部页面继承的类
 * @author junxue.rao
 *
 */
public class OpenAction extends AbstractAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7884452196770624417L;
	
	private List<Category> cities;
	
	private List<Message> questions;
	
	private int questionNumber;
	
	private MsgService msgService;
	
	@Override
	public HttpHeaders create() {
		return null;
	}

	@Override
	public String destroy() {
		return null;
	}

	@Override
	public String edit() {
		return null;
	}

	@Override
	public HttpHeaders editNew() {
		return null;
	}

	@Override
	public HttpHeaders index() {
		this.questionNumber = this.msgService.countQuestions();
		this.questions = this.msgService.listQuestions(SMALL_NUMBER);
		return null;
	}

	@Override
	public HttpHeaders show() {
		return null;
	}

	@Override
	public String update() {
		return null;
	}
	
	public List<Category> getCities() {
		return cities;
	}
	
	public List<Message> getQuestions() {
		return questions;
	}
	
	public int getQuestionNumber() {
		return questionNumber;
	}
	
	public void setMsgService(MsgService msgService) {
		this.msgService = msgService;
	}
	
	public MsgService getMsgService() {
		return msgService;
	}
}
